package animator.phantom.xml;

/*
    Copyright Janne Liljeblad 2006,2007,2008

    This file is part of Phantom2D.

    Phantom2D is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Phantom2D is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Phantom2D.  If not, see <http://www.gnu.org/licenses/>.
*/

//import animator.phantom.project.TimeLineClipGroup;
import animator.phantom.project.Project;
import animator.phantom.renderer.*;
import animator.phantom.renderer.param.*;
import org.w3c.dom.*;
import java.awt.Dimension;

public class TimeLineClipGroupXML extends AbstractXML
{
	public static String ELEMENT_NAME = "tlcgroup";
	public static String TLC_NODE_ELEMENT_NAME = "tlcnode";
	public static String NODEID_ATTR = "nodeid";
	public static String OPEN_ATTR = "isopen";
/*
	public static TimeLineClipGroup getObject( Element e, Project proj )
	{

		TimeLineClipGroup tlcg = new TimeLineClipGroup();
		tlcg.setIsOpen( getBoolean( e, OPEN_ATTR ) );
		NodeList clips = e.getElementsByTagName( TLC_NODE_ELEMENT_NAME );

		for( int i = 0; i < clips.getLength(); i++ )
		{
			Element clip = (Element) clips.item( i );
			int nodeID = getInt( clip, NODEID_ATTR );
			RenderNode node = proj.getRenderFlow().getNode( nodeID );
			ImageOperation iop = node.getImageOperation();
			tlcg.add( iop );
		}
		return tlcg;

		return null;
	}

	public static Element getElement( TimeLineClipGroup tlcGroup, Project proj )
	{

		Element e = doc.createElement( ELEMENT_NAME );
		e.setAttribute( OPEN_ATTR, booleanStr( tlcGroup.isOpen() ) );
		for( int i = 0; i < tlcGroup.size(); i++ )
		{
			Element nodee = doc.createElement( TLC_NODE_ELEMENT_NAME );
			ImageOperation iop = ( ImageOperation ) tlcGroup.elementAt( i );
			RenderNode node = proj.getRenderFlow().getNode( iop );
			nodee.setAttribute( NODEID_ATTR, intStr( node.getID()  ));
			e.appendChild( nodee );
		}
		return e;

		return null;
	}
*/

}//end class